/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.company.common.dao.impl;

import com.company.common.dao.AmphurDao;
import com.company.regis.db.BaseDao;
import com.company.regis.db.entity.Amphur;
import java.util.List;
import org.springframework.stereotype.Repository;

/**
 *
 * @author totoland
 */
@Repository("amphurDao")
public class AmphurDaoImpl extends BaseDao implements AmphurDao{

    @Override
    public List<Amphur> getAmphurByProvinceId(String provinceId) {
        return findNativeQuery("SELECT AMPHUR_ID, AMPHUR_CODE, AMPHUR_NAME, GEO_ID, PROVINCE_ID "
                + "FROM AMPHUR WHERE PROVINCE_ID = ?", 
                Amphur.class,provinceId);
    }
    
}
